<div>
<style type="text/css">
/* Styl hiperlaczy w tabeli */
table a:link {
	text-decoration: none;
	font-weight: bold;
	color: #FFF;
	font-size: 16px;
}
table a:visited {
	text-decoration: none;
	font-weight: bold;
	color: #FFF;
}
table a:active {
	text-decoration: none;
	font-weight: bold;
	color: #FFF;
}
table a:hover {
	text-decoration: underline;
	font-weight: bold;
	color: #000;
}
/* Styl pol tabeli */
.tab{
	font-family: "Times New Roman", Times, serif;
	font-size: 16px;
	background-color: #06F;
	padding: 7px 7px 7px 7px;
	margin: 0px 2px 10px 0px;
}
#tab1{
	font-family: "Times New Roman", Times, serif;
	width: 140px;
	height: 20px;
	font-size: 16px;
	background-color: #06F;
	padding: 7px 7px 7px 7px;
	margin: 0px 2px 10px 0px;
    overflow: auto;
}
#tab2{
	font-family: "Times New Roman", Times, serif;
	width: 250px;
	height: 20px;
	font-size: 16px;
	background-color: #06F;
	padding: 7px 7px 7px 7px;
	margin: 0px 2px 10px 0px;
    overflow: auto;
}
</style>
    <?php		
		$conection = mysql_connect($mysql_host,$mysql_user,$mysql_password);
		mysql_set_charset('utf8',$conection);
		@mysql_select_db($mysql_database) or die("Nie udalo sie wybrac bazy danych");
		
		$query = "SELECT * FROM SUBJECT;";
		$result = mysql_query($query);
		$ilosc = mysql_num_rows($result);
		while($row = mysql_fetch_assoc($result)){
			$date = date_create($row['DATE']);
			print("
				  <table>
				      <tr>
					      <td><div id='tab1'>".$row['TITLE']."</div></td>
						  <td><div id='tab2'>".$row['OPIS']."</div></td>
						  <td><div class='tab'>".date_format($date,'Y-m-d')."</div></td>
						  <td><div class='tab'><a style='font-family: Arial, Helvetica, sans-serif;' href='#'>[Edytuj]</a></div></td>
						  <td><div class='tab'><a style='font-family: Arial, Helvetica, sans-serif;' href='#'>[Usun]</a></div></td>
					  </tr>
				 </table>
				 "); //$row['ID']  <- ID to licznik grup jest z Bazy danych
		}
		mysql_close();
	?>
</div>